/** 
 * File-Name:UserManager.java
 *
 * Created on 2012-3-11 下午2:52:41
 * 
 * @author: Neo (neolimeng@gmail.com)
 * Software Engineering Institute, Peking University, China
 * 
 * Copyright (c) 2009, Peking University
 * 
 *
 */
package cn.edu.pku.sei.i.service;

import java.sql.Connection;

import neoutil.CommonService;
import neoutil.DaoSupport;
import cn.edu.pku.sei.i.dao.InternDao;
import cn.edu.pku.sei.i.entity.Intern;

/**
 * Description:
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2012-3-11 下午2:52:41
 */
public class UserManager extends CommonService {

	public String addIntern(Intern intern) {
		Connection connection = null;
		try {
			connection = DaoSupport.getConnection();

			InternDao internDao = new InternDao(connection);

			internDao.save(intern);

			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			return EXCEPTION;
		} finally {
			closeConnection(connection);
		}
	}
}
